<?php

/* 
 * 2017-4-12
('350000','福建省','35','00','00','1');
('350600','漳州市','35','06','00','2')
('350681','龙海市','35','06','81','3');
省份：where level=1
城市：where sheng='35' and level=2
地区：where sheng='35' and di='06' and level=3
 */
// code,sheng,di,xian,name,level
$str= file_get_contents('shengdixian.txt');
if($str){
$arr= json_decode($str,true);
foreach($arr as $row){
    echo "insert into t_porg_area (code, name, pid, cid, aid, level) values ('".$row['code']."','".$row['name']."','".$row['sheng']."','".$row['di']."','".$row['xian']."','".$row['level']."');<br />";
}
}